import React, { useState } from 'react'
import { ScrollNavbar } from './components/index'

export default function App() {
    const tabs1 = [
        {
            lable: '测试1',
            value: 0,
        },
        {
            lable: '测试数据2',
            value: 1,
        },
        {
            lable: '测试数据3',
            value: 2,
        },
        {
            lable: '测试4',
            value: 3,
        },
        {
            lable: '测试数据5',
            value: 4,
        },
        {
            lable: '数据6',
            value: 5,
        },
        {
            lable: '测试数据7',
            value: 6,
        },
    ]
    const tabs = ['测试', '测试数据2', '测试数据3', '测试4', '测试数据5', '数据6', '测试数据7']

    const [index, setIndex] = useState(0)
    return (
        <div>
            {/* <button
                onClick={() => {
                    setIndex(Math.floor(Math.random() * 7))
                }}
            >
                切换
            </button> */}
            <ScrollNavbar tabs={tabs1} activeKey={index} />
        </div>
    )
}
